﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialAdd.aspx.cs" Inherits="weba.Sales.MaterialAdd" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td height="30" background="../Images/tab_05.gif">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12" height="30">
                                        <img src="../Images/tab_03.gif" width="12" height="30" />
                                    </td>
                                    <td>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td width="46%" valign="middle">
                                                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                        <tr>
                                                            <td>
                                                                <div align="center">
                                                                    <img src="../images/tb.gif" width="16" height="16" /></div>
                                                            </td>
                                                            <td width="95%">
                                                                <span class="titleBold12px">添加材料信息</span></td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td width="54%" align="right">
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                    <td width="16" height="30">
                                        <img src="../Images/tab_07.gif" width="16" height="30" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="8" background="../images/tab_12.gif">
                                        &nbsp;
                                    </td>
                                    <td>
                                                                                            <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        材料名称：
                                                    </td>
                                                    <td align="left">
                                                        <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
                                                            ErrorMessage="请输入材料名称" ValidationGroup="val" Display="Dynamic" 
                                                            SetFocusOnError="True"></asp:RequiredFieldValidator>
                                                        <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="txtName"
                                                            Display="Dynamic" ErrorMessage="已存在此名称，请输入其他名称" OnServerValidate="CustomValidator1_ServerValidate"
                                                            ValidationGroup="val" SetFocusOnError="True"></asp:CustomValidator>
                                                            <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        材料类型：
                                                    </td>
                                                    <td align="left">
                                                        <asp:RadioButtonList ID="rbtnlMaterialCategoryID" runat="server" 
                                                            RepeatDirection="Horizontal" RepeatLayout="Flow">
                                                        </asp:RadioButtonList>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="rbtnlMaterialCategoryID"
                                                            Display="Dynamic" ErrorMessage="请选择材料类型" SetFocusOnError="True" ValidationGroup="val"></asp:RequiredFieldValidator></td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        生产厂家：
                                                    </td>
                                                    <td align="left">
                                                        <asp:DropDownList ID="ddlManufacturerID" runat="server" AutoPostBack="True" 
                                                            onselectedindexchanged="ddlManufacturerID_SelectedIndexChanged">
                                                        </asp:DropDownList>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator15" runat="server" 
                                                            ControlToValidate="ddlManufacturerID" Display="Dynamic" 
                                                            ErrorMessage="请选择生产厂家" SetFocusOnError="True" ValidationGroup="val"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        厂家代码：
                                                    </td>
                                                    <td align="left">
                                                        
                                                        <asp:RadioButtonList ID="rbtnlCode" runat="server" RepeatDirection="Horizontal" 
                                                            RepeatLayout="Flow">
                                                        </asp:RadioButtonList>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator16" runat="server" 
                                                            ControlToValidate="rbtnlCode" Display="Dynamic" ErrorMessage="请选择厂家代码" 
                                                            ValidationGroup="val"></asp:RequiredFieldValidator>
                                                        
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        说明：
                                                    </td>
                                                    <td align="left">
                                                        不能添加相同名称的材料名称；如果存在某材料的订单，则不能删除此材料。
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td width="100" height="30" align="right">
                                                        &nbsp;
                                                        <br />
                                                    </td>
                                                    <td align="center">
                                                        <asp:Button ID="btnAdd" runat="server" Text="添加" OnClick="btnAdd_Click" ValidationGroup="val" 
                                                        Font-Size="16px" Height="30px" Width="100px" />
                                                    </td>
                                                </tr>
                                            </table>
                                    </td>
                                    <td width="8" background="../images/tab_15.gif">
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td height="35" background="../images/tab_19.gif">
                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td width="12" height="35">
                                        <img src="../images/tab_18.gif" width="12" height="35" />
                                    </td>
                                    <td align="center">
                                        &nbsp;
                                    </td>
                                    <td width="16">
                                        <img src="../images/tab_20.gif" width="16" height="35" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
            <Triggers>
                <asp:PostBackTrigger ControlID="btnAdd" />
            </Triggers>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
